#include <stdlib.h>
#define begin() begin
#define end() end
typedef struct deque deque;
struct deque{
       int *val;
       int begin,end,type,size;
};
void setsize(deque *base,int size){
     (*base).type=size;
}
void delete(deque *base,int val){
     if ((*base).end>=val)
        (*base).end-=val;
     else
         (*base).end=0;
}
void prvec(vector base){
     int i;
     for (i=base.begin(),i<=base.end();++i)
         printf("%d ",base.val[i]);
}
void prvecn(vector base,int left,int right){
     int i;
     for (i=left;i<=right;++i)
         printf("%d ",base.val[i]);
}
void alloc(vector *base,int arg){
     (*base).val=(int*)realloc((*base).val,((*base).type) * (arg));
}
